import Vue from 'vue'
import Lodash from 'lodash'

const components = require.context(
	'./components',
	false,
	/\.vue$/,
);

components.keys().forEach(fileName => {
	const name = fileName.split('/').pop().replace(/\.\w+$/, '');
	const comp = components(fileName);
	Vue.component(
		Lodash.upperFirst(name),
		comp.default || comp
	);
});